package com.caijg.exception;

import lombok.Getter;

// 自定义异常，各种其他异常继承这个异常
@Getter
public class CustomException extends RuntimeException{
    private final int code;

    public CustomException(int code) {
        this.code = code;
    }

    public CustomException(String message, int code) {
        super(message);
        this.code = code;
    }

    public CustomException(String message, Throwable cause, int code) {
        super(message, cause);
        this.code = code;
    }

    public CustomException(Throwable cause, int code) {
        super(cause);
        this.code = code;
    }
}
